<?php

namespace app\rongcui\validate;

use think\Validate;

class RongcuiBuyerValidate extends Validate
{
    protected $rule = [
        'name' => 'require|max:8',
        'phone' => 'require|unique:rongcui_buyer|unique:user,mobile',
//        'area' => 'require|number'
    ];

    protected $message = [
        'name.require' => '客户名称不能为空',
        'name.max' => '客户名称不能大于8位',
//        'area.require' => '需求区域不能为空',
//        'area.number' => '需求区域不能为空'
        'phone.unique' => '手机号不能重复',
        'phone.require' => '手机号不能为空',
    ];
}